package geektime.spring.springbucks.waiter.service;

import geektime.spring.springbucks.waiter.model.Coffee;
import geektime.spring.springbucks.waiter.repository.CoffeeRepository;
import lombok.extern.slf4j.Slf4j;
import org.joda.money.Money;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.domain.Example;
import org.springframework.data.domain.Sort;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Optional;

@Service
@Slf4j
public class CoffeeService {
//    @Autowired
//    @Resource
//    @ApolloConfig
//    private Coffee coffee;

//    @Value("${name}")
    private String name;

//    @Value("${quantity}")
    private Long quantity;

    public CoffeeService(){
        super();
    }

    public Coffee getNewCoffee(){
        return Coffee.builder().name(name).quantity(quantity).build();
//        return coffee;
    }
}
